package jhavelogger.models;

import java.util.Date;

import jhavelogger.visitor.LogVisitor;

/**
 * Represents that a particular algorithm has been sent to the client.
 * 
 * @author Jared Schlicht
 */
public class SendAlgorithmToClient extends JHaveLog {

    private String algorithm;
    private Date date;
    
    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    @Override
    public Object accept(LogVisitor visitor) {
	return visitor.visit(this);
    }

    @Override
    public String toString() {
	return "Send Algorithm To Client: " + this.algorithm + " " + this.date.toLocaleString();
    }

    public String getAlgorithm() {
        return algorithm;
    }

    public void setAlgorithm(String algorithm) {
        this.algorithm = algorithm;
    }
    
    public SendAlgorithmToClient(String source, Date date, String algorithm) {
	this.setLogSource(source);
	this.setDate(date);
	this.setAlgorithm(algorithm);
    }
}
